package fw.asmx.materialdesign;

import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;

import fw.asmx.materialdesign.fragment.RecyclerViewPreferenceFragment;

public class TestActivity extends AppCompatActivity
{
    private RecyclerViewPreferenceFragment prefF;

    @Override protected void onCreate(Bundle savedInstanceState)
    {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.test_framelayout);
        prefF = new RecyclerViewPreferenceFragment();
        prefF.addSection("标题一");
        prefF.addTextPrefItem("Text", "summary", true);
        prefF.addCheckBoxPrefItem("复选框1", "提示1", "d", false, true);
        prefF.addSwitchPrefItem("切换开关1", "切换开关的提示","", true, true);
        getSupportFragmentManager().beginTransaction()
                                   .add(R.id.test_fl, prefF).commit();
    }
}
